package factory.base;


import factory.entity.NyStyleCheesePizza;
import factory.impl.NyPizzaIngredientFactory;

/**
 * 披萨简单工厂类
 * @author yaojianfeng
 */
public class SimplePizzaFactory {
    public BasePizza creatPizza(String pizzaType){
        BasePizza pizza = null;
        PizzaIngredientFactory pizzaIngredientFactory = new NyPizzaIngredientFactory();
        if ("cheese".equals(pizzaType)){
            pizza = new NyStyleCheesePizza(pizzaIngredientFactory);
        }
        return pizza;
    }
}
